module.exports = { // 多页面打包
    pluginOptions: {
        electronBuilder: {
            nodeIntegration: true,
            builderOptions: {
                fileAssociations: [
                    {
                        ext: ["mp3", "wav", "flac", "ogg", "m4a"],
                        name: "music",
                        role: "Editor"
                    }
                ],
                "appId": "this.is.tasky",
                "productName": "Tasky",
                "copyright": "Copyright © 2021 Alaso",
                "directories": {
                    "buildResources": "build"
                },
                "mac": {
                    "category": "public.app-category.utilities"
                },
                "dmg": {
                    "background": "build/background.jfif",
                    "icon": "build/icons/icon.icns",
                    "iconSize": 100,
                    "contents": [
                        {
                            "x": 380,
                            "y": 180,
                            "type": "link",
                            "path": "/Applications"
                        },
                        {
                            "x": 130,
                            "y": 180,
                            "type": "file"
                        }
                    ],
                    "window": {
                        "width": 540,
                        "height": 380
                    }
                },
                "win": {
                    "target": [
                        "msi",
                        "nsis"
                    ],
                    "icon": "build/icons/icon.ico"
                },
                "nsis": {
                    "oneClick": false,
                    "language": "2052",
                    "perMachine": true,
                    "allowToChangeInstallationDirectory": true
                }
            }
        }
    },
    publicPath: './',
    pages: {
        main: {
            // 入口js
            entry: 'src/modules/main/main.js',
            // 模板来源
            template: 'public/main.html',
            // dist生成的名字
            filename: "index.html",
            // template html 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
            title: 'Main Page'
        },
        remind: {
            entry: 'src/modules/remind/remind.js',
            template: 'public/remind.html',
            filename: 'remind.html',
            title: "Remind Page"
        }
    }
}